#include <stdio.h>

#include "../include/typedef.h"
#include "../include/thread.h"

void func() {
    printf( "hello, thread!\n");
}

class A
{
public:
    void func() {
        printf( "hello, thread in class!\n");
    }
};

int main() {
    mix::Thread t( func);

    t.start();
    t.join();

    A a;
    t.setThreadFunc( std::tr1::bind(&A::func, &a));
    t.start();
    t.join();

    printf( "bye!\n");

    return 0;
}
